FIND_PATH(OPENCV_INCLUDE_DIR opencv2/opencv.hpp
  "{INCLUDE}"
  "{LIB_DIR}/include"
  "/usr/include/opencv4"
)

FIND_LIBRARY(OPENCV_CORE_LIBRARY NAMES opencv_core PATHS
  "{LIB}"
  "{LIB_DIR}/lib"
)

FIND_LIBRARY(OPENCV_VIDEOIO_LIBRARY NAMES opencv_videoio PATHS
  "{LIB}"
  "{LIB_DIR}/lib"
)

FIND_LIBRARY(OPENCV_IMGPROC_LIBRARY NAMES opencv_imgproc PATHS
  "{LIB}"
  "{LIB_DIR}/lib"
)

FIND_LIBRARY(OPENCV_HIGHGUI_LIBRARY NAMES opencv_highgui PATHS
  "{LIB}"
  "{LIB_DIR}/lib"
)

FIND_LIBRARY(OPENCV_imgcodecs_LIBRARY NAMES opencv_imgcodecs PATHS
  "{LIB}"
  "{LIB_DIR}/lib"
)

FIND_LIBRARY(OPENCV_freetype_LIBRARY NAMES opencv_freetype PATHS
  "{LIB}"
  "{LIB_DIR}/lib"
)

SET(OPENCV_LIBRARY
  ${OPENCV_CORE_LIBRARY}
  ${OPENCV_VIDEOIO_LIBRARY}
  ${OPENCV_IMGPROC_LIBRARY}
  ${OPENCV_HIGHGUI_LIBRARY}
  ${OPENCV_imgcodecs_LIBRARY}
  ${OPENCV_freetype_LIBRARY}
)

IF (OPENCV_INCLUDE_DIR AND OPENCV_LIBRARY)
  SET(OPENCV_FOUND TRUE)
ENDIF()
